home *** CD-ROM | disk | FTP | other *** search
/ Hyper Stacks 1994 May / Hyper Stacks (Pacific HiTech)(1994)[Mac].iso / Utilities / ResGenie™ 1.0 / ResGenie™ / ResGenie™.rsrc / TEXT_204_renamefilert.txt < prev    next >
Encoding:
Text File  |  1993-08-02  |  1.8 KB  |  52 lines

  1.   put  selectedLine of window where into ReplaceLine
  2.   put the text of window where into TheText
  3.   repeat with x = 1 to the number of chars in process
  4.     get char x of process
  5.     if it is ";" then put "," into char x of process
  6.   end repeat
  7.   if word 1 of process is "Deleted:" then
  8.     beep
  9.     do restext("TEXT", "Exit", colorauthoringpath)
  10.   end if
  11.   put item 1 of process into whatKind
  12.   put item 2 of process into itsoldName
  13.   put item 3 of process into itsID
  14.   do showdialog 2, "500", , ,itsoldName, false
  15.   put line 2 of the result into newname
  16.   if newname is itsoldName then do restext("TEXT", "Exit", colorauthoringpath)
  17.   if newname is empty then do restext("TEXT", "Exit", colorauthoringpath)
  18.   do  RenameRes(RenamefilePath, itsID, whatkind, itsoldName, newname)
  19.   put  newName into item 2 of process
  20.   put process into line replaceline of theText
  21.   set the text of window where to theTEXT
  22.   if there is a window holdstackname then
  23.     if holdstackname is renamefilepath then
  24.       set the text of window holdstackname to theText
  25.     end if
  26.   end if
  27.   if there is a window "Resource List" then
  28.     if holdstackname is not renamefilepath then
  29.       set the text of window "Resource List" to theTEXT
  30.     end if
  31.   end if
  32.   set cursor to watch
  33.   put the long name of this stack into check
  34.   delete word 1 of check
  35.   delete char 1 of check
  36.   delete the last char of check
  37.   if check is not renamefilepath then
  38.     start using stack renamefilepath
  39.     stop using stack  renamefilepath
  40.     start using stack renamefilepath
  41.   end if
  42.   if check is renamefilepath then
  43.     answer "Do you want to re-initialize the stack so your resource will be active?" with "No" or "yes"
  44.     if it is "Yes" then 
  45.       set lockscreen to true
  46.       push card
  47.       go home
  48.       pop card
  49.     end if
  50.   else 
  51.     do restext ("TEXT", "Exit", colorauthoringpath)
  52.   end if